class Student {
  constructor(name, age) {
    this.name = name
    this.age = age
  }
  printA() {
    console.log(this.name, this.age)
  }
}

const stu = new Student('张三', 24)
stu.printA()
